<div>
<header>
	Tank Api文档
</header>
<section>
	<h3>返回结果可通过请求头包含指定的值而改变：</h3>
	<ul style="list-style: circle;">
		<li>Response-Body-Include:包含指定路径，例如：name,parent.id,parent.parent.name,class.*等；</li>
		<li>Response-Body-Exclude:隐藏指定路径，例如：name,parent.id,parent.parent.name,class.*等；</li>
		<li>Response-Body-Exclude-Nulls:是否包含值为null的属性（true或false），默认不包含；</li>
	</ul>
	<h3>当启用密码加密时，使用loginId的md5值作为key,使用AES-GCM算法加密，并以base64格式传输密码。以下使用forge的示例：</h3>
	<p>
		<pre>
		<code>
		var rawPassword = "password123";
		var loginId = "654369014168ac7917e9c486";
		var md = forge.md.md5.create();
		md.update(loginId);
		var key = md.digest().bytes();
		var cipher = forge.cipher.createCipher('AES-GCM', key);
		var iv = forge.random.getBytesSync(12);
		cipher.start({
	    	iv: iv
	  	});
	  	cipher.update(forge.util.createBuffer(rawPassword));
	  	cipher.finish();
	  	var encrypted = cipher.output.getBytes();
	  	var tag = cipher.mode.tag.getBytes();
	  	var buffer = forge.util.createBuffer();
	  	buffer.putBytes(iv);
	  	buffer.putBytes(encrypted);
	  	buffer.putBytes(tag);
	  	console.log("encrypted password:"+ forge.util.encode64(buffer.getBytes()));
	  	</code>
	  	</pre>
	</p>
</section>
</div>